const path=require('path')
let pathstr=path.join(__dirname,'/test.txt')
console.log(pathstr)
const fs=require('fs')
fs.readFile(pathstr,'utf-8',function(error,date){
    if(error){
        console.log(err.message)
    }else{
        console.log(date)
    }
})
// .
fs.writeFile(pathstr,'my name is ye','utf-8',function(err){
    if(err){
        return console.log(err.message)
    }else{
        console.log("ok！")
    }
})

